/**
 * 
 */
package com.thor.palmmall.dao.elecharges;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.thor.commons.jpa.entity.PStandardEntity;
import com.thor.palmmall.api.elecharges.EleChargesBillState;
import com.thor.palmmall.api.elecharges.PayMethod;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
@Entity
@Table(name = "PEleChargesBill")
public class PEleChargesBill extends PStandardEntity {
  private static final long serialVersionUID = -3237081361629398432L;

  private String billNumber;
  private String userNumber;
  private BigDecimal amount;
  private EleChargesBillState state;
  private String transactioNo;
  private PayMethod method;
  private String remark;
  private Date actionTime;
  // 以下是支付成功时候返回的数据
  private String buyerLogonId;
  private String sellerEmail;
  private BigDecimal receiptAmount;
  private BigDecimal invoiceAmount;
  private BigDecimal buyerPayAmount;
  private String errMsg;
  private String notifyFlag ;
  
  private String payCardNo;
  /** 充值单号 */
  @Column(name = "billNumber", nullable = false, length = 50)
  public String getBillNumber() {
    return billNumber;
  }

  public void setBillNumber(String billNumber) {
    this.billNumber = billNumber;
  }

  /** 商户号 */
  @Column(name = "userNumber", nullable = false, length = 50)
  public String getUserNumber() {
    return userNumber;
  }

  public void setUserNumber(String userNumber) {
    this.userNumber = userNumber;
  }

  /** 金额 */
  @Column(name = "amount", precision = 14, scale = 2)
  public BigDecimal getAmount() {
    return amount;
  }

  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }

  /** 充值单状态 */
  @Enumerated(EnumType.STRING)
  @Column(name = "state", nullable = false, length = 50)
  public EleChargesBillState getState() {
    return state;
  }

  public void setState(EleChargesBillState state) {
    this.state = state;
  }

  /** 充值流水号 */
  @Column(name = "transactioNo", length = 60)
  public String getTransactioNo() {
    return transactioNo;
  }

  public void setTransactioNo(String transactioNo) {
    this.transactioNo = transactioNo;
  }

  /** 支付方式 */
  @Enumerated(EnumType.STRING)
  @Column(name = "method", length = 50)
  public PayMethod getMethod() {
    return method;
  }

  public void setMethod(PayMethod method) {
    this.method = method;
  }

  /** 备注 */
  @Column(name = "remark", length = 50)
  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  /** 操作时间 */
  @Column(name = "actionTime", length = 50)
  public Date getActionTime() {
    return actionTime;
  }

  public void setActionTime(Date actionTime) {
    this.actionTime = actionTime;
  }

  /** 支付者账户 */
  @Column(name = "buyerLogonId", length = 100)
  public String getBuyerLogonId() {
    return buyerLogonId;
  }

  public void setBuyerLogonId(String buyerLogonId) {
    this.buyerLogonId = buyerLogonId;
  }

  /** 销售者账户 */
  @Column(name = "sellerEmail", length = 100)
  public String getSellerEmail() {
    return sellerEmail;
  }

  public void setSellerEmail(String sellerEmail) {
    this.sellerEmail = sellerEmail;
  }

  /** 实收金额 */
  @Column(name = "receiptAmount", precision = 14, scale = 2)
  public BigDecimal getReceiptAmount() {
    return receiptAmount;
  }

  public void setReceiptAmount(BigDecimal receiptAmount) {
    this.receiptAmount = receiptAmount;
  }

  /** 开票金额 */
  @Column(name = "invoiceAmount", precision = 14, scale = 2)
  public BigDecimal getInvoiceAmount() {
    return invoiceAmount;
  }

  public void setInvoiceAmount(BigDecimal invoiceAmount) {
    this.invoiceAmount = invoiceAmount;
  }

  /** 付款金额 */
  @Column(name = "buyerPayAmount", precision = 14, scale = 2)
  public BigDecimal getBuyerPayAmount() {
    return buyerPayAmount;
  }

  public void setBuyerPayAmount(BigDecimal buyerPayAmount) {
    this.buyerPayAmount = buyerPayAmount;
  }

  @Column(name = "errMsg", length = 1024)
  public String getErrMsg() {
    return errMsg;
  }

  public void setErrMsg(String errMsg) {
    this.errMsg = errMsg;
  }
  /** 支付平台回调状态 success ＝ 成功，failed ＝ 失败 */
  @Column(name = "notifyFlag", length = 1024)
  public String getNotifyFlag() {
    return notifyFlag;
  }

  public void setNotifyFlag(String notifyFlag) {
    this.notifyFlag = notifyFlag;
  }
  @Column(name = "payCardNo")
  public String getPayCardNo() {
    return payCardNo;
  }

  public void setPayCardNo(String payCardNo) {
    this.payCardNo = payCardNo;
  }
  
}
